home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
TOMR.TAS
< prev
next >
Wrap
Text File
|
1992-01-29
|
3KB
|
75 lines
{TOMR.TAS => NEWHIGHS.LST
This script finds stocks with new highs and trading in a
range for 30 days within 15%. The values are listed to
the screen with the chart. Varible days are loaded due to
differing amounts in database.
created on a suggestion by Tom Rategan.
written by Jerry Green 1-22-92
revised 1/27/92 to catch hew high narrow trading band.
#max_quotes 265
{********** Swap braces on output file to print **********}
#output_file 'NEWHIGHS.LST'
{#output_file LPT1.PRN}
{********** No stocks less than 30 days **********}
if quote_count < 30 then
return;
{********** Print a header **********}
if first_ticker then
begin
writeln('Symbol Name Todays PercentOf');
writeln(' Close Volume High 50DMAVol');
end;
{********** Creat arrays **********}
hi_valqc : array;
hi_val30 : array;
lo_val30 : array;
vo_val50 : array;
qc = (quote_count - 5);
hi_valqc = hhv(c,qc);
hi_val30 = hhv(c,30);
lo_val30 = llv(c,30);
vo_val50 = mov(v,50,'s');
hi_base = 0;
nu_hi = 0;
base_30 = 0;
{********** High to close ratio **********}
nu_hival = (c/hi_valqc) * 100;
{********** Trading range **********}
td_rng = (1-(lo_val30/hi_val30)) * 100;
{********** High to close 30 days **********}
nu_hiv30 = (c/hi_val30) * 100;
{********** Volume to VolMA ratio **********}
vo_pcnt = (v/vo_val50) * 100;
{********** Filter and find qualifiers **********}
if nu_hival >= 97 and td_rng <= 15 then
hi_base = 1;
if nu_hival >= 97 and td_rng > 15 then
nu_hi = 1;
if nu_hival < 97 and nu_hiv30 >= 97 and td_rng <= 15 then
base_30 = 1;
if hi_base = 1 or nu_hi = 1 or base_30 = 1
then gosub graphit;
return;
{********** Graph and list High Trading bands **********}
:graphit
if hi_base = 1 then
writeln(ticker,fullname,' ',c,' ',v,' ',int(nu_hival),' ',
int(vo_pcnt),' HI BASE');
if nu_hi = 1 then
writeln(ticker,fullname,' ',c,' ',v,' ',int(nu_hival),' ',
int(vo_pcnt),' NEW HI');
if base_30 = 1 then
writeln(ticker,fullname,' ',c,' ',v,' ',int(nu_hival),' ',
int(vo_pcnt),' RANGE =',td_rng,'%');
opengraph(2,-qc,0);
sizegraph(5,2);
graph(1,''+format(c[0],'$%6.2f')+' is '
+format(nu_hival,'%5.2f%')+' of '
+format(hi_valqc[0],'$%6.2f')+' high of past '
+format(qc,'%4.f')+' days with '+format(td_rng,'%5.2f%')+
' 30 day trading range',mov(c,50,'s'),'50 DMAS');
graph(v,'Volume is '+format(vo_pcnt,'%5.2f%')+
' of',vo_val50,'50 DMA Simple');
closegraph();
return;